package de.tudarmstadt.ukp.muip.fibqdojo;

import de.tudarmstadt.ukp.muip.fibqdojo.interfaces.IFIBQDistractor;

/**
 * Default implementation of a distractor that stores the distractor value and a
 * flag indicating whether this item is the correct answer
 * 
 * @author Tobias Horsmann
 */
public class Distractor implements IFIBQDistractor {

    private final boolean isSolution;
    private final String value;

    public Distractor(String value, boolean isSolution) {
        this.value = value;
        this.isSolution = isSolution;
    }

    @Override
    public String getValue() {
        return value;
    }

    @Override
    public boolean isSolution() {
        return isSolution;
    }

    @Override
    public String toString() {
        return value + "(" + isSolution + ")";
    }

}
